<!--  -->
<template>
    <div id="app" class="flex content">
        <div class="flex  left">
            <div class="flex grow column">
                <indexView
                    v-show="currentType == 's2n'"
                    type="s2n"
                    :currentType.sync="currentType"
                ></indexView>
                <indexView
                    v-show="currentType == 'n2s'"
                    type="n2s"
                    :currentType.sync="currentType"
                ></indexView>
            </div>
        </div>
        <div class="right grow">
            <northBoundList></northBoundList>
        </div>
    </div>
</template>
<script>
import indexView from "./indexView";
import northBoundList from "./northBoundList";

export default {
    data() {
        return {
            currentType: "s2n", // s2n 北向 n2s 南向
            time: null,
        };
    },
    components: { indexView, northBoundList },
    computed: {},
    mounted() {
        this.$store.dispatch("getIndexData");
        window.onresize = (e) => {
            if (this.time) {
                clearTimeout(this.time);
            }
            this.time = setTimeout(() => {
                
                window.location.reload();
            
            }, 1000);
        };
    },

    methods: {},
};
</script>
<style lang="scss" scoped>
#app {
    padding: 10px;
    box-sizing: border-box;
    height: 100%;
}
.content {
    width: 100%;
    overflow-y: auto;
    .left {
        min-width: 780px;
        max-width: 50%;
    }
    .right {
        //flex-basis: 820px;
        min-width: 820px;
        height: 100%;
    }
}
</style>
